package pattern.builder.linked;

// 链式写法创建者类
public class LinkedComputerBuilder {
    private Computer computer = new Computer();
    public LinkedComputerBuilder buildGpu(String gpu) {
        computer.setGpu(gpu);
        return this;
    }
    public LinkedComputerBuilder buildCpu(String cpu) {
        computer.setCpu(cpu);
        return this;
    }
    public Computer build() {
        return computer;
    }
}
